import java.util.ArrayList;

import com.acme.bankapp.domain.bank.*;
import com.acme.bankapp.service.bank.*;


public class BankApplication {

	private static Bank bank;
	private BankService bc;
	
	public BankApplication()
	{
		bank = new Bank();
		bc=new BankService();
		for(int i = 0; i < 10; i++){
			Account ac;
			Gender gender;
			if(i%2 == 0){
				ac = new CheckingAccount(i+5);
				gender = Gender.MALE;
			}
			else{
				ac = new SavingAccount(i*2);
				gender = Gender.FEMALE;
			}
			Client cl = new Client(ac, gender, "Human_"+i);
			bc.addClient(bank, cl);
			bc.printMaximumAmountToWithdraw(bank, cl);
		}
		
	}
	
	public static void main(String[] args) {
		
		BankApplication app = new BankApplication();
		app.modifyBank(bank);
		ArrayList<Client> clients=bank.getClients();
		for(Client client : clients){
			System.out.print(client.getClientSalutation());
		}
		
	}
	
	private void modifyBank(Bank bank){
		ArrayList<Client> clients=bank.getClients();
		for(Client client: clients){
			client.getAccount().withdraw(37);
		}
	}

}
